Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top | Next |

QuickTime VR Intercept Procedure

You can install an intercept procedure that is executed immediately before the QuickTime VR Manager function it is intercepting.

MyInterceptProc

You can define a routine to intercept various QuickTime VR Manager functions.

pascal void MyInterceptProc (
                     QTVRInstance qtvr,
                     QTVRInterceptPtr qtvrMsg,
                     SInt32 refCon,
                     Boolean *cancel);
qtvr
An instance of a QuickTime VR movie.
qtvrMsg
A pointer to an intercept record that specifies the function that your procedure is intercepting and the parameters for that function. See "Intercept Structure" .
refCon
The reference constant specified in the call to QTVRInstallInterceptProc that installed this intercept procedure.
cancel
On exit, a Boolean value that indicates whether the QuickTime VR Manager should not call the intercepted function when your intercept procedure returns ( true ) or should call the intercepted function ( false ).

DESCRIPTION

Your MyInterceptProc procedure is called whenever the QuickTime VR Manager is about to call the function it is intercepting (which is specified by the selector field of the intercept record pointed to by the qtvrMsg parameter). Your procedure can do any processing it deems necessary before returning.

Your intercept procedure should return, in the cancel parameter, a Boolean value that indicates whether your procedure performed the intercepted function ( true ) or not ( false ). The QuickTime VR Manager inspects that value to determine whether it should call the intercepted function after your procedure returns. Your intercept procedure can also call the QTVRCallInterceptedProc function to call the intercepted function. If your procedure does call QTVRCallInterceptedProc , then it should return the value true , unless you want the QuickTime VR Manager to call the intercepted function again.

SEE ALSO

Use QTVRInstallInterceptProc to install an intercept procedure. See Listing 2-5 and Listing 2-6 for sample intercept procedures.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |